package com.neusoft.controller.registration;

import com.neusoft.service.DeptmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/departments")
//@CrossOrigin
public class DeptmentController {

    @Autowired
    private DeptmentService deptmentService;

    @GetMapping("/getDeptmentList")
    public List<Map<String,Object>> getDeptmentList(){
        List<Map<String,Object>> list=deptmentService.getDeptmentList();
        return list;
    }
    @GetMapping("/getCheckDeptmentList")
    public List<Map<String,Object>> getCheckDeptmentList(){
        List<Map<String,Object>> list=deptmentService.getCheckDeptmentList();
        return list;
    }
    @GetMapping("/getInpectionDeptmentList")
    public List<Map<String,Object>> getInpectionDeptmentList(){
        List<Map<String,Object>> list=deptmentService.getInpectionDeptmentList();
        return list;
    }
    @GetMapping("/getDisposalDeptmentList")
    public List<Map<String,Object>> getDisposalDeptmentList(){
        List<Map<String,Object>> list=deptmentService.getDisposalDeptmentList();
        return list;
    }

    //发起异步请求获取科室类别数据(检查部门)y
    @GetMapping("/getDeptmentList1")
    public List<Map<String,Object>> getDeptmentList1(){
        List<Map<String,Object>> list=deptmentService.getDeptmentList1();
        return list;
    }

}
